home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 3863 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: doc.ic.ac.uk!not-for-mail
  2. From: mdf@doc.ic.ac.uk (Martin Frost)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Working with LoadSeg()
  5. Date: 19 Feb 1996 15:15:33 -0000
  6. Organization: Dept. of Computing, Imperial College, University of London, UK.
  7. Distribution: world
  8. Message-ID: <4ga46l$e26@oak65.doc.ic.ac.uk>
  9. References: <DMs687.9w2@utcc.utoronto.ca>
  10. Reply-To: mdf@doc.ic.ac.uk (Martin Frost)
  11. NNTP-Posting-Host: oak65.doc.ic.ac.uk
  12. X-Newsreader: mxrn 6.18-23
  13.  
  14.  
  15. In article <DMs687.9w2@utcc.utoronto.ca>, normb@gpu.utcc.utoronto.ca writes:
  16.  
  17. >> for(ResLib=(struct Resident *)BADDR(LibSeg);
  18. >
  19. >Getting ResLib this way allways fails for me.
  20. >Plus I Dont know why you have this in a for() loop.
  21. >
  22. >>   ResLib->rt_MatchWord==0x4AFC && ResLib->rt_MatchPtr==ResLib;
  23. >                                            ^^^^^^^^^^^
  24. >                                            rt_MatchTag
  25. >>   (UWORD *)ResLib++);
  26.  
  27. I'm not sure, but I don't think that the romtag is obliged to start exactly
  28. 4 bytes in from the start of the hunk. The intention of this code was to
  29. search through the hunk until the romtag marker (0x4AFC) was found. However,
  30. it won't work unless you change the test to
  31.  
  32.     ResLib->rt_MatchWord!=0x4AFC || ResLib->rt_MatchTag!=ResLib;
  33.  
  34. sorry; I've been forced to use a different language for my course where loops
  35. are arranged as untils instead of whiles, and it's messing up my C...
  36.  
  37. >In looking at the includes (exec/resident.h) the comment beside
  38. >rt_MatchWord is /* word to match on (ILLEGAL) */ Does this mean
  39. >its illegal to use this field??
  40.  
  41. No, it means that 0x4AFC is an instruction guaranteed to remain illegal on
  42. all 680x0 CPUs, for use as a breakpoint or similar.
  43.  
  44. Martin
  45.